import { Button, Modal, message, type TableProps } from "antd";
import { DataType1, DataType } from "@/types/home";

const del = () => {
  console.log("del");
  Modal.confirm({
    title: "提示",
    content: "您确定要删除嘛？",
    onOk: () => {
      //   getDataList();
      message.success("成功删除");
    },
    onCancel() {},
  });
};
export const columns: TableProps<DataType>["columns"] = [
  // { label: '网点类型', prop: 'orgType', enum: { 1: '营业网点', 2: '集散中心', 3: '总公司', 4: '中转网点', 5: '承运商' } },
  // { label: '经营类型', prop: 'businessType', enum: { 1: '直营', 2: '加盟', 3: '临时' } },
  {
    width: 120,
    title: "网点名称",
    dataIndex: "orgName",
    align: "center",
  },
  {
    width: 150,
    align: "center",
    title: "网点简称",
    dataIndex: "orgShorter",
  },
  {
    title: "公司名称",
    align: "center",
    width: 160,
    dataIndex: "acceptLinkPhone",
  },
  {
    width: 120,
    align: "center",
    title: "接货电话",
    dataIndex: "reachSiteId",
  },
  {
    width: 220,
    align: "center",
    title: "提货电话",
    dataIndex: "carryLinkPhone",
  },
  {
    width: 120,
    align: "center",
    title: "网点类型",
    dataIndex: "orgType",
  },
  {
    width: 120,
    align: "center",
    title: "负责人",
    dataIndex: "orgPrincipal",
  },
  {
    width: 220,
    align: "center",
    title: "经营类型",
    dataIndex: "businessType",
  },
  {
    width: 100,
    align: "center",
    title: "网点地址",
    dataIndex: "departmentAddress",
  },
  {
    width: 120,
    align: "center",
    title: "备注",
    dataIndex: "remark",
  },
  {
    width: 100,
    title: "操作",
    dataIndex: "operation",
    align: "center",
    fixed: "right",
    render: () => {
      return (
        <Button type="text" style={{ color: "#1677ff" }} onClick={del}>
          删除
        </Button>
      );
    },
  },
];
